﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ue.Qcdz.Domain.Membership;
using Ue.Qcdz.Domain.Shops;
namespace Ue.Qcdz.Repositories.Shops
{
    public class ShopFroxy : Shop
    {
        public ShopFroxy(object key, string name, string logoUrl, string keyWords, string description, int IsTop, string remark, int status, DateTime createOn, string banner)
            : base(key)
        {
            this.Name = name;
            this.LogoUrl = logoUrl;
            //默认LOGO
            if (string.IsNullOrEmpty(this.LogoUrl)) this.LogoUrl = "/Themes/zh-cn/Images/Shop/default_Logo.jpg";
            //
            this.KeyWords = keyWords;
            this.Description = description;
            this.IsTop = IsTop;

            this.Status = status;
            this.CreateOn = createOn;
            this.Banner = banner;
            //默认值banner
            if (string.IsNullOrEmpty(this.Banner)) this.Banner = "/Themes/zh-cn/Images/Shop/default_Banner.jpg";
            //
            string[] arrRemark = (remark + "|||||||||||||||||||||||||||||").Split('|');
            this.Remark = arrRemark[0];
            this.Linkman = arrRemark[1];
            this.CompanyAddress = arrRemark[2];
            this.Postcode = arrRemark[3];
            this.Telephone = arrRemark[4];
            this.Mobilephone = arrRemark[5];
            this.Fax = arrRemark[6];
            this.Email = arrRemark[7];
            this.MSN = arrRemark[8];
            this.QQ = arrRemark[9];
            this.SiteUrl = arrRemark[10];
            //
            this.CompanyName = arrRemark[11];
            this.RegisteredCapital = arrRemark[12];
            this.LegalPerson = arrRemark[13];
            this.Employees = arrRemark[14];
            this.EstablishingTime = arrRemark[15];
            this.CompanyProfiles = arrRemark[16];

            //
        }

        public new User User
        {
            set { base.User = value; }
            get { return base.User; }
        }
    }
}
